//
//  HXAttentViewModel.m
//  ZCooking
//
//  Created by 韩旭 on 16/9/5.
//  Copyright © 2016年 HX_. All rights reserved.
//

#import "HXAttentViewModel.h"
#import "HXAttentTopicsModel.h"
#import "HXAttentCommentModel.h"
#import "HXAttentLikeModel.h"

@implementation HXAttentViewModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.ID = value;
    }
    if ([key isEqualToString:@"description"]) {
        self.Description = value;
    }
}
- (instancetype)initWithDic:(NSDictionary *)dic {
    self = [super initWithDic:dic];
    if (self) {
    self.topics = [[HXAttentTopicsModel getAttentTopicsWithArray:dic[@"topics"]] mutableCopy];
        self.comment = [[HXAttentCommentModel getAttentCommentWithArray:dic[@"comment"]] mutableCopy];
        self.like = [[HXAttentLikeModel getAttentLikeWithArray:dic[@"like"]] mutableCopy];
    }
    return self;
}

@end
